package com.bleeth.fx.component;

import cn.hutool.core.convert.Convert;
import com.bleeth.fx.helper.ControlsHelper;
import javafx.scene.control.Button;
import javafx.scene.layout.Region;
import lombok.Builder;


/**
 * @author Sakura
 * @version 1.0
 * @date 2021-11-13 22:17
 **/
@Builder
public class MCard {


    private double height;
    private double width;

    public Region make() {
        Button box = new Button();
        box.setPrefHeight(Convert.toDouble(height,50D));
        box.setPrefWidth(Convert.toDouble(width,50D));
        box.setStyle(ControlsHelper.randomBgColor());
        return box;
    }


}
